package Q3;

import java.util.Scanner;

public class Main {

    public static int n;
    public static String str;
    public static String ret = null;

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        n = scanner.nextInt();
        str = scanner.next();

        char[] ch = new char[n];
        for (int i = 0; i < n; i++) {
            System.out.print(ch[i] + " ");
        }

        dfs(new char[n], 0, new boolean[n]);

        System.out.println(ret == null ? "no" : ret);
    }

    /**
     *
     * @param ch
     * @param index2 ch 下标
     * @param flag 标记数组
     */
    public static void dfs(char[] ch,int index2, boolean[] flag) {

        if (ret != null) {
            return;
        }

        if (index2 == n) {
            String str1 = new String(ch);
//            System.out.println(str1);
            for (int i = 1; i < n; i++) {
                if (str1.charAt(i) == str1.charAt(i - 1)) {
                    return;
                }
            }

            ret = str1;
            return;
        }

        for (int i = 0; i < n; i++) {
            if (!flag[i]) {
                ch[index2] = str.charAt(i);
                flag[i] = true;
                dfs(ch, index2 + 1, flag);

                flag[i] = false;
            }
        }
    }
}
